const getters = {
  // user模块
  userInfo: state => state.user.userInfo,
  token: state => state.user.token,  
  
  // app模块
  theme: state => state.app.theme,
  appConfig: state => state.app.config,
  
  // 一些计算属性
  hasLogin: state => !!state.user.token,
  isDarkTheme: state => state.app.theme === 'dark'
}

export default getters